package com.cloudfun.campusshare.service;

import com.cloudfun.campusshare.common.constant.AnnouncementType;
import com.cloudfun.campusshare.common.model.vo.AnnouncementAddVO;
import com.cloudfun.campusshare.common.model.vo.AnnouncementListVO;
import com.cloudfun.campusshare.common.response.BaseResult;
import com.cloudfun.campusshare.common.response.PageResult;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Set;

/**
 * @author : zhangyongjie
 * @version : 1.0
 * @createTime : 2020/6/5 18:25
 * @description :
 */
public interface AnnouncementService {
    /**
     * 添加公告
     *
     * @param announcementAddVO
     */
    void createAnnouncement(AnnouncementAddVO announcementAddVO);

    /**
     * 查询公告列表
     *
     * @param keyword
     * @param type
     * @param startTime
     * @param endTime
     * @return
     */
    PageResult queryAnnouncementList(Pageable pageable,
                                     String keyword,
                                     Set<AnnouncementType> type,
                                     String startTime,
                                     String endTime);

    /**
     * 下线公告
     *
     * @param announcementId
     */
    void offlineAnnouncement(String announcementId);

    /**
     * 删除公告
     *
     * @param announcementId
     */
    void deleteAnnouncement(String announcementId);

    /**
     * 用户端获取公告列表
     * @param type
     * @param washPointId
     * @return
     */
    List<AnnouncementListVO> queryForUserPartList(AnnouncementType type, String washPointId);

    /**
     * 公告校验
     * @param announcementAddVO
     * @return
     */
    BaseResult check(AnnouncementAddVO announcementAddVO);
}
